package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendanceRecordAddDTO;
import org.jsola.hr.dto.AttendanceRecordUpdateDTO;
import org.jsola.hr.query.AttendanceRecordQuery;
import org.jsola.hr.vo.AttendanceRecordListVO;
import org.jsola.hr.vo.AttendanceRecordVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工考勤记录")
public interface IAttendanceRecordControllerAPI {

    /**
     * 新增员工考勤记录
     * @param attendanceRecordAddDTO 员工考勤记录新增实体
     * @return 员工考勤记录展示对象
     */
    @ApiOperation(value = "新增员工考勤记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordAddDTO", dataType = "AttendanceRecordAddDTO", value = "新增员工考勤记录", paramType = "body")
    })
    Result<AttendanceRecordVO> save(AttendanceRecordAddDTO attendanceRecordAddDTO);


    /**
     * 修改员工考勤记录
     * @param attendanceRecordUpdateDTO 员工考勤记录
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工考勤记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordUpdateDTO", dataType = "AttendanceRecordUpdateDTO", value = "修改员工考勤记录", paramType = "body")
    })
    Result<Integer> update(AttendanceRecordUpdateDTO attendanceRecordUpdateDTO);




    /**
     * 删除单个员工考勤记录，彻底删除
     * @param attendanceRecordId 员工考勤记录id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工考勤记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordId", dataType = "String", value = "员工考勤记录id", paramType = "path")
    })
    Result<Integer> delete(String attendanceRecordId);


    /**
     * 批量删除员工考勤记录，彻底删除
     * @param attendanceRecordIds 员工考勤记录id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工考勤记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordIds", dataType = "String[]", value = "员工考勤记录id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendanceRecordIds);


    /**
     * 根据员工考勤记录id查询员工考勤记录详情
     * @param attendanceRecordId 员工考勤记录id
     * @return 员工考勤记录详情
     */
    @ApiOperation(value="根据员工考勤记录id查询员工考勤记录详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordId", dataType = "String", value = "员工考勤记录id", paramType = "path")
    })
    Result<AttendanceRecordVO> findById(String attendanceRecordId);


    /**
     * 查询员工考勤记录
     * @param attendanceRecordQuery 员工考勤记录查询参数
     * @return page
     */
    @ApiOperation(value="查询员工考勤记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordQuery", dataType = "AttendanceRecordQuery", value = "员工考勤记录查询参数", paramType = "query")
    })
    Result<List<AttendanceRecordListVO>> listAll(AttendanceRecordQuery attendanceRecordQuery);


     /**
     * 分页查询员工考勤记录
     * @param attendanceRecordQuery 员工考勤记录查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工考勤记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceRecordQuery", dataType = "AttendanceRecordQuery", value = "员工考勤记录查询参数", paramType = "query")
    })
    Result<Page<AttendanceRecordListVO>> page(AttendanceRecordQuery attendanceRecordQuery);

    /**
     * 员工考勤记录EXCEL导入
     * @param file 员工考勤记录EXCEL文件
     * @return 导入结果
     */
    @ApiOperation(value = "员工考勤记录EXCEL导入")
    @ApiImplicitParams({
//            @ApiImplicitParam(name = "file", dataType = "MultipartFile", value = "员工考勤记录EXCEL导入", paramType = "body")
    })
    Result<Boolean> attendanceRecordImportExcel(MultipartFile file);


}

